feat(docs): add prettier-plugin-bootstrap for automatic class sorting#42383
Open
pierluigilenoci wants to merge 1 commit into
Open
feat(docs): add prettier-plugin-bootstrap for automatic class sorting#42383pierluigilenoci wants to merge 1 commit into
pierluigilenoci wants to merge 1 commit into
Conversation
3 tasks
7fe4e5a to
3158fd4
Compare
7a4e7fe to
b61bbe7
Compare
Contributor
Author
|
cc @julien-deramond @mdo @coliff — this adds automatic Bootstrap class sorting to the docs site via a Prettier plugin (similar to prettier-plugin-tailwindcss). Happy to adjust anything if needed. |
7d7841b to
4cb6504
Compare
coliff
reviewed
May 11, 2026
fb31ab8 to
1c07845
Compare
Contributor
Author
|
Update: addressed @coliff's review — consolidated the |
fd6303c to
51e3b49
Compare
Adds `prettier-plugin-bootstrap` (v0.3.0) to automatically sort Bootstrap CSS classes following the framework's architecture order. - Adds `prettier-plugin-bootstrap@^0.3.0` as a dev dependency - Configures `.prettierrc.json` with the plugin (after prettier-plugin-astro) - Reformats 28 `.astro` files with sorted class attributes (no functional changes) Plugin features: - Sorts classes: layout → components → helpers → utilities - Responsive variants sort after their base class - Supports HTML, JSX/TSX, Vue, Angular, Svelte, and Astro - Public sorting API via `prettier-plugin-bootstrap/sorter` - 121 tests, 100% coverage, zero runtime dependencies Signed-off-by: Pierluigi Lenoci <pierluigilenoci@gmail.com>
51e3b49 to
dc668d1
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add
prettier-plugin-bootstrapto the docs site Prettier configuration for automatic Bootstrap CSS class sorting. This ensures consistent class ordering across all.astrofiles insite/.Changes
prettier-plugin-bootstrap@^0.3.0as a dev dependencyprettier-plugin-bootstrapalongsideprettier-plugin-astro.astrofiles: Apply automatic class reordering produced by the new plugin (components, layouts, pages)Notes
site/directory is affected; core Bootstrap source is untouchedprettier --checkwith the updated configStatus: ready for review